import {ADD_PERSON} from '../constant'

const initValue = [{id:'001',name:'小明',age:18}];
export default function personReducer(prestate=initValue,action){
    switch (action.type) {
        case ADD_PERSON:
            return [action.data,...prestate]
        default:
            return prestate;
    }
}